import type { BaseComponentType } from "./types";
export function isFunction(value: unknown): value is Function {
  return typeof value === "function";
}
export function getSlotsDom(component: BaseComponentType) {
  if (isFunction(component)) {
    return getSlotsDom(component());
  } else {
    return component ? (
      Array.isArray(component) ? (
        component.map((t) => <>{t}</>)
      ) : (
        <>{component}</>
      )
    ) : null;
  }
}
